package asdf.trial;

import org.slf4j.bridge.SLF4JBridgeHandler;

public class LoggerTest
{

    public static void main(String[] args)
    {
        // java util logging
        SLF4JBridgeHandler.install();
        java.util.logging.Logger jul = java.util.logging.Logger.getLogger("jul");
        jul.finest("it's jul printing finest ...");
        jul.finer("it's jul printing finer ...");
        jul.fine("it's jul printing fine ...");
        jul.config("it's jul printing config ...");
        jul.info("it's jul printing info ...");
        jul.warning("it's jul printing warning ...");
        jul.severe("it's jul printing severe ...");

        // java.commons.logging
        org.apache.commons.logging.Log jcl =
                org.apache.commons.logging.LogFactory.getLog(LoggerTest.class);
        jcl.debug("it's jcl printing debug ...");
        jcl.info("it's jcl printing info ...");
        jcl.error("it's jcl printing error ...");
        jcl.fatal("it's jcl printing fatal ...");

        // log4j
        org.apache.logging.log4j.Logger log4j = org.apache.logging.log4j.LogManager.getLogger();
        log4j.trace("it's log4j printing trace ...");
        log4j.debug("it's log4j printing debug ...");
        log4j.info("it's log4j printing info ...");
        log4j.warn("it's log4j printing warn ...");
        log4j.error("it's log4j printing error ...");
        log4j.fatal("it's log4j printing fatal ...");

        // slf4j
        org.slf4j.Logger slf4j = org.slf4j.LoggerFactory.getLogger(LoggerTest.class);
        slf4j.trace("it's sl4j printing trace ...");
        slf4j.debug("it's sl4j printing debug ...");
        slf4j.info("it's sl4j printing info ...");
        slf4j.warn("it's sl4j printing warn ...");
        slf4j.error("it's sl4j printing error ...");
    }

}
